package com.deng.test.entity;


/**
 * @author Dengxiaobing
 * @version 1.0
 * @description
 * @date 2022/9/8 18:08
 */
public enum ResultCode {

    //成功、正常
    SUCCESS(1000, "请求成功"),

    //失败
    @SuppressWarnings("unused")
    FAILED(1001, "请求失败"),

    //未知错误
    @SuppressWarnings("SpellCheckingInspection")
    UNKNOW_ERROR(1002, "未知错误"),

    //返回包装错误
    RESPONSE_PACK_ERROR(1003, "response返回包装失败"),

    //请求方式错误
    NOT_SUPPORT_METHOD(1004, "请求方式错误"),

    //请求参数错误
    REQUEST_PARAM_ERROR(1005, "请求参数错误"),

    //用户不存在
    USER_NOT_EXIST(2001, "用户不存在"),

    //密码错误
    INCORRECT_PASSWORD_ERROR(2002, "密码错误"),

    UNAUTH(3000, "认证失败"),
    
    BUSINESS_ERROR(4000, "业务异常");
    private final int code;
    private final String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}